﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Data.Entity;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using GPI.Models;

namespace GPI.Controllers
{ 
    public class InscriptionListController : Controller
    {
        private Entities DB;
        private Entities db
        {
            get
            {
                if (DB == null)
                {
                    DB = Entities.GetEntitiesForUser(User);
                }
                return DB;
            }
        }
        //
        // GET: /InscriptionList/

        public ViewResult Index()
        {
            var gpi_student = db.GPI_STUDENT.Include(g => g.GPI_PROJECT);
            return View(gpi_student.ToList());
        }

        

        protected override void Dispose(bool disposing)
        {
            db.Dispose();
            base.Dispose(disposing);
        }
    }
}